<?php


namespace App\Services;


use App\Repositories\CodeRepository;
use Illuminate\Support\Arr;

class CodeService
{
    function get($code, $value = false)
    {
        $rep = new CodeRepository();
        $map = $rep->getMap($code);
        if ($value !== false) {
            return Arr::get($map, $value);
        }
        return $map;
    }
}
